<!DOCTYPE html>

<html>

	<head>
		<meta charset="utf-8">
		<title>Lambkit管理平台</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">

		<link rel="stylesheet" href="#(ctx)/lambkit/assets/libs/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="#(ctx)/lambkit/assets/css/style.css">
	</head>

	<body>
		<div class="layui-layout layui-layout-admin">
			<div class="layui-header">
				<div class="layui-logo">Lambkit管理平台</div>
				<!-- 头部区域（可配合layui已有的水平导航） -->
				#if(auth)
				<ul class="layui-nav layui-layout-left">
					<li class="layui-nav-item">
						<a href="#(ctx)/lambkit/dev">控制台</a>
					</li>
					<li class="layui-nav-item layui-this">
						<a href="#">节点管理</a>
					</li>
					<li class="layui-nav-item">
						<a href="#(ctx)/lambkit/dev/mgrdb">数据管理</a>
					</li>
					<li class="layui-nav-item">
						<a href="#(ctx)/lambkit/help">帮助文档</a>
					</li>
				</ul>
				<ul class="layui-nav layui-layout-right">
					<li class="layui-nav-item">
						<i class="layui-icon layui-icon-username" style="color: #FFFFFF;"></i>&nbsp;#(auth.user.realname??)
					</li>
				</ul>
				#else
				<ul class="layui-nav layui-layout-right">
					<li class="layui-nav-item">
						<a href="#(ctx)/lambkit/login">登录</a>
					</li>
				</ul>
				#end
			</div>
		</div>
		<div class="layui-container">
			<div class="layui-row" style="background: white; height: 40px;">
			</div>
			<div class="layui-row" style="background: white;">
				<div class="layui-col-md12">
					<div class="layui-card">
						<div class="layui-card-header"><h1 style="display: inline;">Overview</h1>
							<span style="color: gray;">#(node.name)#if(node.status==1) (active) #end</span></div>
						<div class="layui-card-body">
							<table class="layui-table">
								<colgroup>
									<col width="50">
									<col width="200">
									<col>
								</colgroup>
								<thead>
									<tr>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>Started:</td>
										<td>#long2date(node.startTime)</td>
									</tr>
									<tr>
										<td>Version:</td>
										<td>#(node.lambkitVersion)</td>
									</tr>
									<tr>
										<td>Cluster ID:</td>
										<td>#(node.id)</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
					
					<div class="layui-card">
						<div class="layui-card-header"><h1 style="">Summary</h1></div>
						<div class="layui-card-body">
							<table class="layui-table">
								<colgroup>
									<col width="50">
									<col width="200">
									<col>
								</colgroup>
								<thead>
									<tr>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>Name:</td>
										<td><a href="#(ctx)/lambkit/node/info/#(node.id)">#(node.name)</a></td>
									</tr>
									<tr>
										<td>Type:</td>
										<td>#(node.type)</td>
									</tr>
									<tr>
										<td>IP:</td>
										<td>#(node.ip):#(node.port)#(node.contexPath)</td>
									</tr>
									<tr>
										<td>OS Name:</td>
										<td>#(node.osName)</td>
									</tr>
									<tr>
										<td>OS Memory:</td>
										<td>#(node.maxMemory) MB</td>
									</tr>
									<tr>
										<td>Total Memory:</td>
										<td>#(node.totalMemory) MB</td>
									</tr>
									
									<tr>
										<td>Free Memory:</td>
										<td>#(node.freeMemory) MB</td>
									</tr>
									<tr>
										<td>Run Time:</td>
										<td>#(node.runtime/1000) s</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
					
					<div class="layui-card">
						<div class="layui-card-header"><h1 style="">NodeTable</h1></div>
						<div class="layui-card-body">
							<table class="layui-table">
								<colgroup>
									<col width="150">
									<col width="200">
									<col>
								</colgroup>
								<thead>
									<tr>
									</tr>
								</thead>
								<tbody>
									#if(ntsize>0)
									#for(x:ntable)
									<tr>
										<td>#(x.name)</td>
										<td>#(x.type)</td>
										<td>#(x.lambkitVersion)</td>
										<td>#(x.ip):#(x.port)</td>
										<td>#(x.startTime)</td>
									</tr>
									#end
									#end
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
		<script src="#(ctx)/lambkit/assets/libs/layui/layui.js" charset="utf-8"></script>
		<script>
			//JavaScript代码区域
			layui.use('element', function() {
				var element = layui.element;
			});
		</script>
	</body>

</html>